package com.homestead.feign;

import com.homestead.xxljob.XxlJobInfo;
import com.xxl.job.core.biz.model.ReturnT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author yhb
 * @date 2021-04-25 14:06
 */
@FeignClient(name = "xxl-job-center")
public interface XxlJobFeignService {
    @PostMapping(value = "/xxl-job-center/jobinfo/add")
    ReturnT<String> addJob(@RequestBody XxlJobInfo jobInfo);

    @PostMapping(value = "/xxl-job-center/jobinfo/remove")
    ReturnT<String> removeJob(@RequestParam("id") int id);
}
